package org.jeecg.modules.erp.goods.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.erp.goods.entity.ErpGoods;
import org.jeecg.modules.erp.goods.entity.ErpGoodsSupplier;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.erp.goods.vo.ErpGoodsPage;
import org.jeecg.modules.erp.goods.vo.ErpGoodsSupplierVo;

/**
 * @Description: 物料供应商
 * @Author: jeecg-boot
 * @Date:   2024-06-11
 * @Version: V1.0
 */
public interface ErpGoodsSupplierMapper extends BaseMapper<ErpGoodsSupplier> {

	/**
	 * 通过主表id删除子表数据
	 *
	 * @param mainId 主表id
	 * @return boolean
	 */
	public boolean deleteByMainId(@Param("mainId") String mainId);

  /**
   * 通过主表id查询子表数据
   *
   * @param mainId 主表id
   * @return List<ErpGoodsSupplier>
   */
	public List<ErpGoodsSupplier> selectByMainId(@Param("mainId") String mainId);

	IPage<ErpGoodsSupplierVo> myPage(Page<ErpGoodsSupplierVo> page, @Param("model") ErpGoodsSupplierVo model);

	ErpGoodsSupplier findBySupplierId(@Param("model") ErpGoodsSupplier model);
}
